package com.yonyou.cyxdms.sysAuth.service.service.impl;

import com.yonyou.cyx.framework.util.bean.ApplicationContextHelper;
import com.yonyou.cyxdms.framework.bean.dto.user_info.LoginInfoDto;
import com.yonyou.cyxdms.sysAuth.service.feign.CustomerService;
import com.yonyou.cyxdms.sysAuth.service.service.HomePageService;
import com.yonyou.cyxdms.sysAuth.service.service.Login.UserLoginServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.Map;

/**
 * @author ：quankk
 * @date ：Created in 2019/7/8 18:03
 * @description：homePage pc迁移
 */

@Service
@Transactional(rollbackFor = Exception.class)
public class HomePageServiceImpl implements HomePageService {

    // 定义日志接口
    private static final Logger logger = LoggerFactory.getLogger(UserLoginServiceImpl.class);

    @Autowired
    private CustomerService customerService;

    @Override
    public Map<String, Object> queryForSalesHome() {
        logger.info("GQDMS query for sales HomePage"+new Date());
        LoginInfoDto loginInfoDto = ApplicationContextHelper.getBeanByType(LoginInfoDto.class);
        //售前流程数据
//        return customerService.queryForSalesHome(loginInfoDto.getOwnerCode(), loginInfoDto.getAppId()).getData();
        return null;
    }
}
